import Vue from 'vue'

var mixins = {
	methods:{
		operatorConfirm(action,text){
			this.$confirm(`您确定${text}吗?`,'提示',{
				confirmButtonText:'确定',
				cancelButtonText:'取消',
				type:'warning'
			}).then(()=>{
				this.$message({
					message:`${text}成功`,
					type:'success'
				});
				action();
			}).catch(()=>{
				this.$message({
					message:`取消${text}`,
					type:'info'
				})
			})
		}
	}
}

Vue.mixin(mixins);
export default{}
